// src/api/lottery.js
import request from '../request/request';

// 获取中奖记录
export const getWinningRecords = (userId) => {
  return request({
    url: '/Winning/index',
    method: 'post',
    data: { user_id: userId }, // 不再需要 headers
  });
};

// 获取奖品数据
export const getPrizeData = (scenicId) => {
  return request({
    url: '/active/index',
    method: 'post',
    data: { scenic_id: scenicId }, // 不再需要 headers
  });
};

// 获取活动数据
export const getActiveData = (activeId) => {
  return request({
    url: '/Actprize/index',
    method: 'post',
    data: { active_id: activeId }, // 不再需要 headers
  });
};

// 提交中奖结果
export const submitWinningResult = (data) => {
  return request({
    url: '/Winning/add',
    method: 'post',
    data, // 不再需要 headers
  });
};